﻿@using KPIS.GERP.Models;
@using KPIS.GERP.Models.ICM
@model KPIS.GERP.Models.ICM.MovementDtl

@if (ViewContext.RouteData.Values["action"].ToString().ToLower() == "editmovementdtl")
{
@Html.HiddenFor(model => model.MovementDtlId) 
}
@Html.HiddenFor(model => model.MovementId)
@Html.HiddenFor(model => model.RecordStatus)
@Html.HiddenFor(model => model.CreatedBy)
@Html.HiddenFor(model => model.CreatedWhen)
@Html.HiddenFor(model => model.UpdatedBy)
@Html.HiddenFor(model => model.UpdatedWhen)

@{
    //var modelMovement = (Movement)ViewBag.modelMovement;
}

<div class="widget-box">
    <div class="widget-header">
        <h4>เพิ่มข้อมูลการโอนย้าย</h4>
    </div>
    <div class="widget-body">
        <div class="widget-body-inner">
            <div class="widget-main">

               <div class="control-group">
                <div class="control-label">
                        รายการพัสดุ :
                </div>
                   <div class="controls">
                       @if (Model.Movement.MoveMethod == 1)
                       {
                           @Html.DropDownListFor(model => model.AssetId, new KPIS.GERP.WEB.GIMS.AssetService.AssetServiceClient().SelectListWhAsset(@Model.Movement.SourceWarehouseId, null)
                         , new { id = "lenderType", style="width:500px;" })
                       }
                       else if (Model.Movement.MoveMethod == 2)
                       {
                           @Html.DropDownListFor(model => model.AssetId, new KPIS.GERP.WEB.GIMS.AssetService.AssetServiceClient().SelectListJsAsset(@Model.Movement.SourceJobSiteId,null)
                         , new { id = "lenderType", style="width:500px;" })
                       }
                       
                   </div>
               </div>

               <div class="control-group">
               <div class="control-label">
                        คำอธิบาย :
               </div>
                   <div class="controls" id="Description">
                       @Html.TextAreaFor(model => model.Asset.Description, new { disabled="disabled", id = "Description", style="width:488px;" } )
                   </div>
               </div>

               <div class="control-group">
               <div class="control-label">
                        จำนวนทั้งหมด :
               </div>
                   <div class="controls" id="QuantityVal">
                     @Html.TextBoxFor(model => model.Asset.Quantity, new { disabled="disabled" })
                   </div>
               </div>

             <div class="control-group">
               <div class="control-label">
                        หน่วย :
               </div>
                   <div class="controls" id="UnitName">
                       @Html.TextBoxFor(model => model.Asset.MasUnit.Name, new { disabled="disabled"})
                   </div>
               </div>

            @*  <div class="control-group">
               <div class="control-label">
                        จำนวนที่ต้องการย้ายโอน :
               </div>
                  <div class="controls">
                      @Html.TextBoxFor(model => model.MoveQty)
                      @Html.ValidationMessageFor(model => model.MoveQty)
                  </div>
             </div>*@
        </div>
     </div>
  </div>
</div>
 
